#pragma once
#include "renderer.h"
#include "window.h"
#include "render_control.h"

namespace krryn{
namespace core{ class job_manager; }
namespace system{
	template<typename _RenderTag = system::opengl_tag>
	class default_renderer{
	public:
		typedef _RenderTag api;

		typename system::renderer<api>::ptr m_Renderer;
		typename gui::render_control<api>::ptr m_RenderControl;
		gui::window::ptr m_Window;

		default_renderer(core::job_manager* a_Manager){
			// setup a default rendering window

			// we might eventually read those variables form a file
			unsigned int l_Width  = 640;
			unsigned int l_Height = 480;

			m_Window = window::with()
				.width(l_Width)
				.height(l_Height)
				.title("krryn::default window")
				.left(200)
				.top(200)
			.create();

			m_RenderControl = render_control<api>::with()
				.parent(m_Window)
				.width(l_Width)
				.height(l_Height)
				// .fullscreen(true)
			.create();

			m_Renderer = system::renderer<api>::ptr(
				new system::renderer<api>(a_Manager, *m_RenderControl));
		}
	};
}
}